package com.xinfu.newproject.adapter.complaint_adapter;

import android.os.Build;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xinfu.newproject.R;

public class ComplaintImageAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public ComplaintImageAdapter() {
        super(R.layout.recycler_complaint_image);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        Glide.with(mContext).load(item).asBitmap().into((ImageView) helper.getView(R.id.recycler_complaint_image));
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            helper.getView(R.id.recycler_complaint_image).setTransitionName("image" + helper.getPosition());
        }
    }

}

